home *** CD-ROM | disk | FTP | other *** search
- 1 rem "" draw poker
- 5 clr
- 20 print:print
- 25 print"":print""
- 27 print">>>> draw poker <<<<":print
- 30 print"CCCCCCCCCCCCCCC"
- 32 print"1o 1o 1o 1o a "
- 34 print"AASSXXZZA "
- 36 print"AAASSSXXXZZZ "
- 38 print"AAASSSXXXZZZ "
- 40 print"A ASSXXZZ A"
- 42 print" 1o 1o 1o 1o a"
- 44 print"FFFFFFFFFFFFFFF"
- 50 print:print"adapted to vic 20 by j. almon 1983"
- 55 print:print""
- 60 forz1=1to3000
- 65 nextz1
- 90 clr
- 100 print:print"game rules:"
- 110 p9=100
- 115 print:print"1.you may draw up to four cards."
- 120 print:print"2.on betting, bet a zero to call."
- 130 print:print"3.bet a negative (-) number to fold."
- 131 print:print:print:print"please standby, while i shuffle the cards. thank you."
- 133 poke36879,202
- 135 gosub3100
- 138 clr:dim t(13),c9(4),s(4,13),m(5),m1(5),c(5),c1(5)
- 139 p9=100
- 140 forx=1to4:fori=1to13:s(x,i)=0:nexti:nextx:print
- 150 print"":print"cards are reshuffled!":poke36879,28
- 151 gosub1400
- 160 a9=5:print:print"ante of $5.00"
- 162 print:print"you have $";p9
- 163 gosub1400
- 164 forz1=1to3000
- 165 nextz1
- 170 forx=1to5:gosub920:m(x)=c:m1(x)=s:nextx:gosub1040
- 178 gosub1300
- 180 print:print"i'll deal my hand.":print
- 190 forx=1to5:gosub920:c(x)=c:c1(x)=s:nextx
- 200 gosub1080:c1=t:c2=h9:p1=-5
- 208 gosub1400
- 210 print"open with a bet";:inputb
- 211 gosub1300
- 212 ifb<0then210
- 214 ifrnd(0)<.2then230
- 220 ifint(((t*rnd(0))+1)+((h9*rnd(0))+1)+(t*10))<b-(b/10)then440
- 225 forz1=1to2000
- 226 nextz1
- 227 gosub1400
- 230 a9=a9+b:print"i'll accept.":print
- 235 gosub1300
- 240 print:print"how many cards to replace";:print:inputk9
- 242 gosub1300
- 245 ifk9=0then290
- 250 forx=1tok9
- 260 print"card number";:inputt9:gosub920
- 265 gosub1300
- 270 ift9<6then280
- 275 print"enter card number from 1 to 5.":goto260
- 280 m(t9)=c:m1(t9)=s:nextx:gosub1040
- 290 gosub1070:forx=1to5:t(m(x))=t(m(x))+1:c9(m1(x))=c9(m1(x))+1
- 300 nextx:gosub640:p1=t:gosub800:p2=h9
- 310 print:gosub1080:h9=0:ift>3then350
- 320 forz=1to5:ifh9=3then340
- 322 ift(c(z))<>1then340
- 324 h9=h9+1
- 330 gosub920:c(z)=c:c1(z)=s
- 340 nextz
- 350 print"i'll take";h9;"cards.":h8=h9
- 355 gosub1400
- 360 gosub1080:c1=t:gosub800:c2=h9
- 370 b9=int((c1*rnd(0))+(c2*rnd(0))+(c1*10))+int(a9/3)+((k9-h8)*2)+7
- 380 b1=0:print
- 381 ifrnd(0)<c1*.5then390
- 382 b9=99.99
- 389 gosub1400
- 390 print"how much do you bet";:print:inputb
- 395 gosub1300
- 400 ifb<-1then570
- 402 a9=a9+b1
- 410 ifb=0thengosub480:goto540
- 420 ifa9+b<b9then460
- 422 ifa9+b<b9+(b9/2)then450
- 430 ifb9=99.99then450
- 440 print"i'm out!":gosub480:goto580
- 450 print"i call!":a9=a9+b:gosub480:goto540
- 460 b1=int(((b9-a9)/3)*rnd(0))+2:a9=a9+b
- 465 forz5=1to2000
- 466 nextz5
- 467 gosub1300
- 468 gosub1400
- 470 print"i raise $";b1:goto390
- 480 print:print"i had ";:t=c1:gosub820
- 481 gosub1300
- 482 ift>.99then490
- 484 print:goto500
- 490 print"high card was a ";:c=c2:gosub1200:print
- 495 gosub1400
- 500 ifp1=-5then530
- 510 print"you had ";:t=p1:gosub820
- 511 gosub1300
- 512 ift>.99then520
- 514 print:print:return
- 520 print"high card was a ";:c=p2:gosub1200:print
- 525 gosub1400
- 530 print:return
- 540 ifc1=p1then550
- 542 ifc1<p1then580
- 544 goto570
- 550 ifc2=p2then560
- 552 ifc2<p2then580
- 554 goto570
- 560 print"it was a tie!!!":gosub1300:gosub1400:goto590
- 570 print"i won $";a9:p9=p9-a9:gosub1400:gosub1400:goto590
- 580 print"you won $";a9:p9=p9+a9:gosub1300:gosub1300
- 590 print:print"again? (y=yes)";:inputb$:ifb$="y"then140
- 600 print:ifp9<0then630
- 610 ifp9=>101then620
- 612 print"you left losing $";100-p9:gosub1400:gosub1400:gosub1400:goto1100
- 619 print""
- 620 print:print:print:print"congratulations, you left winning $";p9:gosub3100:goto1100
- 630 print"you owe me $;-p9:goS1300:goS1400:goS1300:gO1100
- 640 t=0:fori=1to4:ifc9(i)<>5then650
- 642 t=5
- 650 nexti:i=2:h9=0
- 660 i=i-1:ifi<>0then670
- 662 i=13
- 670 ift(i)<1then660
- 672 h9=1
- 675 ifi<>1then680
- 677 i=14
- 680 z=i-4
- 690 i=i-1:ift(i)<>1then720
- 700 ifz<>1then690
- 710 t=t+4:ifz<>10then720
- 712 ift=4then170
- 714 t=t+1
- 720 ifi=13then660
- 722 ift<>5then730
- 724 ift(1)<>1then730
- 726 h9=1
- 730 ift=0then740
- 732 return
- 740 fori=1to13:ift(i)<>4then750
- 745 t=7
- 750 ift(i)<>3then760
- 752 t=t+5:h9=i
- 760 ift(i)<>2then790
- 762 ift=5then780
- 764 ift<>0then770
- 766 h9=0
- 770 ifh9=1then780
- 772 ifh9>ithen780
- 774 h9=i
- 780 t=t+1
- 790 nexti
- 792 ift<>5then810
- 794 t=3:return
- 800 ifh9<>1then810
- 802 h9=14
- 810 return
- 820 ift=0thenprint"nothing":return
- 830 ift=1thenprint"one pair":return
- 840 ift=2thenprint"two pair":return
- 850 ift=3thenprint"3 of a kind":return
- 860 ift=4thenprint"straight":return
- 870 ift=5thenprint"flush":return
- 880 ift=6thenprint"full house":return
- 890 ift=7thenprint"4 of a kind":return
- 900 ift=9thenprint"straight -":print"flush.":return
- 910 print"royal flush!!!":return
- 920 s=int(4*rnd(0))+1:c=int(13*rnd(0))+1
- 930 ifs(s,c)=1then920
- 932 s(s,c)=1:return
- 940 forz1=1to500
- 942 nextz1
- 945 ifc=1thenprint"a ";:return
- 950 ifc=11thenprint"j ";:return
- 960 ifc=12thenprint" q ";:return
- 970 ifc=13thenprint" k ";:return
- 980 ifc=14thenprint" a ";:return
- 990 printc;:return
- 1000 rem
- 1005 ifs=1thenprint"S":return
- 1010 ifs=2thenprint"A":return
- 1020 ifs=3thenprint"Z":return
- 1030 print"X":return
- 1040 print"":print"here is your hand:":print:forx=1to5
- 1050 c=m(x):s=m1(x):print"card";x;"is a ";:gosub940:gosub1000
- 1055 gosub1400
- 1060 nextx:return
- 1070 forx=1to4:c9(x)=0:nextx:forx=1to13:t(x)=0:nextx:return
- 1080 gosub1070:forx=1to5:t(c(x))=t(c(x))+1
- 1090 c9(c1(x))=c9(c1(x))+1:nextx:gosub640:return
- 1100 end
- 1150 print:print"i had ";:t=c1:gosub820
- 1160 print"high card was ";:c=c2:gosub940:gosub1000:print:return
- 1200 rem
- 1205 ifc=1thenprint"ace":return
- 1210 ifc=2thenprint"duece":return
- 1220 ifc=11thenprint"jack":return
- 1230 ifc=12thenprint"queen":return
- 1240 ifc=13thenprint"king":return
- 1250 ifc=14thenprint"ace":return
- 1260 printc"":return
- 1300 rem lo
- 1305 poke36878,15
- 1310 forz5=1to10
- 1315 poke36874,240
- 1320 nextz5
- 1325 poke36874,0
- 1330 poke36878,0
- 1335 return
- 1400 rem hi
- 1405 poke36878,15
- 1410 forz5=1to10
- 1415 poke36875,240
- 1420 nextz5
- 1425 poke36875,0
- 1430 poke36878,0
- 1435 return
- 3100 rem
- 3110 return
-